﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace ContactManager.Models.Validation
{
    public class ValidationState
    {
        private readonly ValidationErrorCollection _errors;

        public ValidationErrorCollection Errors
        {
            get
            {
                return _errors;
            }
            
        }

        public bool IsValid
        {
            get
            {
                return Errors.Count == 0;
            }
        }
        public ValidationState(){}

        public ValidationState(ValidationErrorCollection vec)
        {
            _errors = vec;
        }
    }
}